/**
 * 
 */
package date;

/**  
* <p>Title: NumberFormat.java</p>  
* <p>Description: </p>  
* @author dragon  
* @date 2018年11月30日  
* @version 1.0  
*/
public class NumberFormat {
	
    private static int getWeekIndex(String week){
        int result = -1;
        String[] arr = new String[]{"补位","星期一","星期二","星期三","星期四","星期五","星期六","星期日"};
        for(int i=0;i<arr.length;i++) {
        	if(arr[i].equals(week)) {
        		result = i;
        		break;
        	}
        }
        return result;
    }
    
    public static void main(String[] args) {
    	int a = getWeekIndex("星期日");
    	System.out.println(a);
	}
}
